package com.lagou;/*
 *Author:cxz
 *@Date:${Date}
 */

import com.alibaba.nacos.api.config.annotation.NacosValue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @ClassName ConfigApplication
 * @Description
 * @Author cxz
 * @Date 2020/7/7 18:36
 * Version V1.0
 */
@SpringBootApplication
@EnableDiscoveryClient
@RestController
@RefreshScope
public class ConfigApplication {

    public static void main(String[] args) {
        SpringApplication.run(ConfigApplication.class);
    }
    @Value(value = "${nacos.test.propertie:123}")
    private String testProperties;

    @GetMapping("/test")
    public String test(){
        return testProperties;
    }

}
